package com.dev.springBootDemo.proxy2;

/**
 * 用户业务实现（面向接口编程鸟纲）
 * @author zhumq
 * @date 2024/7/2 21:35
 */
public class UserServiceImpl implements UserService{
    @Override
    public void login(String loginName, String password) throws Exception {

        if ("admin".equals(loginName) && "123456".equals(password)) {
            System.out.println("登录成功");
        }else {
            System.out.println("登录失败");
        }
        Thread.sleep(1000);
    }

    @Override
    public void deleteUser() throws Exception {
        System.out.println("删除了10个用户");
        Thread.sleep(1000);

    }

    @Override
    public String[] selectUsers() throws Exception {
        System.out.println("查询了2个用户");
        String[] users = new String[]{"张三", "李四"};
        Thread.sleep(1000);
        return users;
    }
}
